/*
 * @Date: 2022-06-10 14:46:09
 * @LastEditors: Dweriout 2428458948@qq.com
 * @LastEditTime: 2022-06-10 16:12:00
 * @FilePath: \xshop2d:\workProject\nien-vue3-admin\src\api\BusinessConfig\costCountryPartition.ts
 */
import request from '@/utils/request'

// 查询成本价国家分区列表
export const getData = (data) => request({
  url: '/system/costCountryPartition/list',
  method: 'post',
  data,
})

// 修改成本价国家分区
export function editData(data) {
  return request({
    url: '/system/costCountryPartition/edit',
    method: 'put',
    data,
  })
}
// 新增成本价国家分区
export function addData(data) {
  return request({
    url: '/system/costCountryPartition/add',
    method: 'POST',
    data,
  })
}
// 删除成本价国家分区
export function delData(ids) {
  return request({
    url: `/system/costCountryPartition/remove/${ ids }`,
    method: 'delete',
    
  })
}
// 查询成本价国家分区邮编列表
export function getCodeList(params) {
  return request({
    url: '/system/costPricPostcode/list',
    method: 'post',
    data: params,
  })
}
// 新增成本价国家分区邮编
export function addCodeList(data) {
  return request({
    url: '/system/costPricPostcode/insertOrUpdate',
    method: 'post',
    data,
  })
}
// 删除成本价国家分区邮编
export function delCodeList(ids) {
  return request({
    url: `/system/costPricPostcode/remove/${ ids }`,
    method: 'delete',
  })
}
// 国家分区-批量新增或修改
export function batchAddOrUpdate(data) {
  return request({
    url: '/system/costCountryPartition/batchAddOrEditCountry',
    method: 'post',
    data,
  })
}
// 国家分区-批量新增或修改前校验国家是否存在
export function batchCheckCountry(data) {
  return request({
    url: '/system/costCountryPartition/batchCheckCountry',
    method: 'post',
    data,
  })
}
